home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / MacGofer 0.22d / MacGofer Sources / Makefile.ztc < prev    next >
Encoding:
Makefile  |  1994-01-06  |  3.0 KB  |  87 lines  |  [TEXT/MPS ]

  1. HFILES      = prelude.h storage.h connect.h errors.h command.h
  2. CFILES      = gofer.c storage.c input.c static.c type.c \
  3.           output.c compiler.c machine.c builtin.c  \
  4.           gofc.c cmachine.c cbuiltin.c runtime.c
  5. INCFILES    = parser.c preds.c prims.c kind.c subst.c \
  6.           machdep.c commonui.c
  7. GC_SRC      = markscan.c twospace.c
  8. YFILES      = parser.y
  9. SOURCES     = $(HFILES) $(CFILES) $(INCFILES) $(YFILES) prelude
  10. OBJECTS     = storage.obj input.obj static.obj type.obj compiler.obj
  11. IOBJECTS    = gofer.obj builtin.obj  machine.obj output.obj $(OBJECTS)
  12. COBJECTS    = gofc.obj cbuiltin.obj cmachine.obj $(OBJECTS)
  13. TESTS       = apr0.exe apr1.exe apr2.exe apr3.exe apr4.exe apr5.exe apr6.exe apr7.exe apr8.exe apr9.exe apr10.exe
  14.  
  15. # Edit the following settings as required.
  16. # There are two choices of command line editor that can be used with Gofer:
  17. #
  18. #  GNU readline:        usual GNU sources (e.g. bash distribution)
  19. #  add -DUSE_READLINE=1 to CFLAGS and libreadline.a -ltermcap to LDFLAGS
  20. #                     (or maybe -lreadline -ltermcap)
  21. #
  22. #  editline:            (comp.sources.misc, vol 31, issue 71)
  23. #  add -DUSE_READLINE=1 to CFLAGS and libedit.a to LDFLAGS
  24. #                     (or maybe -ledit)
  25. #
  26. # The best bet is to `touch prelude.h' after changing these settings to
  27. # ensure that the whole collection of files is recompiled with the correct
  28. # settings.
  29.  
  30. CC      = ztc
  31. CFLAGS      = -mx -w2
  32. LDFLAGS     = 
  33. OPTFLAGS    = 
  34.  
  35. all     : gofer.exe gofc.exe runtime.obj
  36.  
  37. tests       : $(TESTS)
  38.  
  39. gofer.exe       : $(IOBJECTS)
  40.           $(CC) $(CFLAGS) $(OPTFLAGS) $(IOBJECTS) -ogofer.exe $(LDFLAGS)
  41.    
  42.  
  43. gofc.exe        : $(COBJECTS)
  44.           $(CC) $(CFLAGS) $(OPTFLAGS) $(COBJECTS) -ogofc.exe $(LDFLAGS)
  45.  
  46.  
  47. .c.obj        :
  48.           $(CC) -c $(CFLAGS) $(OPTFLAGS) $<
  49.  
  50. clean       :
  51.           rm *.obj $(TESTS)
  52.  
  53. install     :
  54.           mv gofer.exe ..
  55.           mv gofc.exe ..
  56.  
  57. .gs.exe   :
  58.           gofc $*.gs
  59.           $(CC) $(CFLAGS) $(OPTFLAGS) $*.c c:\gofer\lib\runtime.obj -o$*.exe $(LDFLAGS)
  60.           rm $*.c
  61.  
  62. .gp     :
  63.           gofc + $*.gp
  64.           $(CC) $(CFLAGS) $(OPTFLAGS) $*.c c:\gofer\lib\runtime.obj -o$*.exe $(LDFLAGS)
  65.           rm $*.c
  66.  
  67. parser.c    : parser.y
  68.           yacc parser.y
  69.           mv y.tab.c parser.c
  70.  
  71. gofer.obj     : prelude.h storage.h connect.h errors.h \
  72.           command.h machdep.c commonui.c
  73. gofc.obj      : prelude.h storage.h connect.h errors.h \
  74.           command.h machdep.c commonui.c output.c
  75. runtime.obj   : prelude.h gofc.h machdep.c $(GC_SRC)
  76. storage.obj   : prelude.h storage.h connect.h errors.h
  77. input.obj     : prelude.h storage.h connect.h errors.h parser.c command.h
  78. static.obj    : prelude.h storage.h connect.h errors.h
  79. type.obj      : prelude.h storage.h connect.h errors.h preds.c kind.c subst.c
  80. output.obj    : prelude.h storage.h connect.h errors.h
  81. compiler.obj  : prelude.h storage.h connect.h errors.h
  82.           $(CC) -c -O1 $(CFLAGS) compiler.c
  83. machine.obj   : prelude.h storage.h connect.h errors.h
  84. cmachine.obj  : prelude.h storage.h connect.h errors.h
  85. builtin.obj   : prelude.h storage.h connect.h errors.h prims.c
  86. cbuiltin.obj  : prelude.h storage.h connect.h errors.h prims.c
  87.